#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQuickView>
#include <QtQml>
#include <QDebug>

int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);
    QQuickView viewer;
       viewer.setResizeMode(QQuickView::SizeViewToRootObject);
       viewer.setSource(QUrl("qrc:/main.qml"));
       viewer.show();
       return app.exec();
}
